package com.dkts.oil.mysql.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import org.locationtech.jts.geom.LineString;
import org.locationtech.jts.geom.Point;

import java.sql.Timestamp;
import java.util.List;

@Data
@Schema(description = "船舶轨迹分段实体类")
public class ShipTrackSegments {

    @Schema(description = "分段唯一标识，自增主键", example = "10001")
    private Long segmentId;

    @Schema(description = "船舶唯一标识码（MMSI），用于关联船舶", example = "369970969")
    private String mmsi;

    @Schema(description = "分段序号，同一船舶轨迹中分段的顺序编号", example = "1")
    private Integer segmentIndex;

    @Schema(description = "该段轨迹的起始时间", example = "2021-08-20T08:00:00Z")
    private Timestamp startTime;

    @Schema(description = "该段轨迹的结束时间", example = "2021-08-20T09:00:00Z")
    private Timestamp endTime;

    @Schema(description = "起点经度", example = "-76.317257")
    private Double startLon;

    @Schema(description = "起点纬度", example = "36.867047")
    private Double startLat;

    @Schema(description = "终点经度", example = "-76.318000")
    private Double endLon;

    @Schema(description = "终点纬度", example = "36.868000")
    private Double endLat;

    @Schema(description = "该轨迹段中包含的轨迹点数量", example = "100")
    private Integer pointCount;

    @Schema(description = "该段轨迹的平均航速（单位：节）", example = "12.5")
    private Double avgSpeed;

    @Schema(description = "该段轨迹的最大航速（单位：节）", example = "15.0")
    private Double maxSpeed;

    @Schema(description = "轨迹段的总长度（单位：公里）", example = "50.25")
    private Double distance;

    @Schema(description = "轨迹段持续时间（单位：分钟）", example = "60.0")
    private Double times;

    @Schema(description = "记录创建时间（审计字段）", example = "2021-08-20T08:00:00Z")
    private Timestamp createdAt;

    @Schema(description = "记录更新时间（审计字段）", example = "2021-08-20T08:00:00Z")
    private Timestamp updatedAt;

    @Schema(description = "轨迹段的几何表示（LineString，WGS84坐标系，SRID=4326）")
    private LineString geom;

    @Schema(description = "轨迹段起点的空间几何表示（Point，SRID=4326）")
    private Point startPoint;

    @Schema(description = "轨迹段终点的空间几何表示（Point，SRID=4326）")
    private Point endPoint;

    @Schema(description = "导入的唯一标识，用于轨迹分组等", example = "UNIQUE_123456")
    private String uidkey;

    private List<double[]> points;

}
